import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: () => import('@/views/layout/layout.vue'),
    redirect: '/home',
    children: [{
      path: '/home',
      component: () => import('@/views/home/home.vue')
    },
    {
      path: '/my',
      component: () => import('@/views/my/my.vue')
    },
    {
      path: '/qa',
      component: () => import('@/views/qa/qa.vue')
    },
    {
      path: '/video',
      component: () => import('@/views/video/video.vue')
    }
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/login/login.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
